Many electronic devices include acoustic devices (such as microphones or speakers) in order to record sound, output sound, and/or perform other functions. In order to transmit sound, an acoustic device may be coupled to an external environment through an acoustic path. However, the acoustic path may expose the acoustic device to liquids or other contaminants from the external environment. The presence of liquid or other contaminants on or around the acoustic device may adversely affect the performance of the device. The present disclosure is directed to systems and techniques for detecting and/or removing a liquid or other contaminant from an acoustic device.